﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VoiceAI;
using VoiceAI.VoiceResponse;

namespace XiaoweiVoiceAI.ResponseCreators
{
    internal static class MaintainPositionResponseCreator
    {
        private class MaintainPositionResponseData : IMaintainPositionResponseData
        {
            public ResponseType ResponseType => ResponseType.MaintainPosition;

            public ErrorCode ErrorCode => ErrorCode.NoError;

            public string RequestText { get; set; }
            public string ResponseText { get; set; }
            public string TTSUrl { get; set; }

            public bool RestoreInHistory => true;

            public object DataContext { get; set; }
        }
        public static IResponseData CreateResponseData(XiaoweiVoiceAI xiaoweiVoiceAI, XiaoweiV2.ResponseParam param)
        {
            MaintainPositionResponseData maintainPositionResponseData = new MaintainPositionResponseData();
            maintainPositionResponseData.ResponseText = param.ResponseText;
            maintainPositionResponseData.RequestText = param.RequestText;
            maintainPositionResponseData.TTSUrl = XiaoweiV2.ResponseHelper.GetTTSUrl(param);
            return maintainPositionResponseData;
        }
    }
}
